#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
typedef struct student
{
	char name[10];
	int id;
	float score;
}stu;

int main()
{
	stu s = { "qing", 231212, 80.0 };
	FILE* pf = fopen("example.txt", "w");
	if (pf == NULL)
	{
		perror(" fopen fail");
		return 1;
	}
	fprintf(pf, "%s %d %f", s.name, s.id, s.score);
	fclose(pf);
	pf = NULL;
	return 0;
}